package org.xiaobai.tool.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.xiaobai.tool.dao.TBingImageDao;
import org.xiaobai.tool.dao.TImagesDao;
import org.xiaobai.tool.po.TBingImagePO;
import org.xiaobai.tool.po.TImagesPO;
import org.xiaobai.tool.service.TBingImageService;
import org.xiaobai.tool.service.TImagesService;

/**
 * @author dingfeng.xiao
 * @description
 * @date 2023/9/7 13:13
 */
@Service
public class TBingImageServiceImpl extends ServiceImpl<TBingImageDao, TBingImagePO> implements TBingImageService {
    @Override
    public TBingImagePO findByDate(String date) {
        return getOne(new LambdaQueryWrapper<TBingImagePO>()
        .eq(TBingImagePO::getBingDate, date)
        .last("limit 1"));
    }
}
